In general, during data communication using for example Universal Serial Bus protocol often referred to as USB protocol, the available memory in a host may be divided in multiple segments. Each memory segment is allocated to certain functionality, for example being a buffer for bi-directional control traffic, being a buffer for incoming data traffic or being a buffer for outgoing data traffic. Memory demands are strongly dependent on the used USB device. The requirements of a USB device can be defined full-custom by the device vendor or a device can belong to a certain USB class. USB classes can be for example Human Interface Device class, also called HID class, Mass Storage Device class, Video Device class, Hubs, Wireless controllers and more. A USB class defines certain behavior of a device belonging to this class.
A device belonging to the mass storage class for example features large bursty data. Therefore, it uses bulk transfer as USB endpoint type. Bulk transfer does not guarantee any latency or minimum bandwidth and will use the un-allocated bus bandwidth. Usually mass storage devices are characterized by having data streams mainly from the device to the host, the so called ‘reading’, or from the host to the device, the so called ‘writing’. There is no bidirectional data transmission in terms of equal data rates from the device to the host and vice versa.
USB communication is performed through pipes, each pipe is connected to an endpoint at the host side as well as at the device side. Data transmission on each endpoint can be independent from each other. Data transmission between two endpoints is always unidirectional. For bidirectional data transmission at least two endpoints in the host and two corresponding endpoints in the device are necessary. Sole exceptions are control pipes which work bidirectional. Between each host and each device only one control pipe is established.
Each endpoint allocates a certain amount of memory to ensure functionality. The size of this memory determines the speed of the connection up to a certain extent.
Patent Abstract of JP2006252334 discloses a data transfer control method and a data transfer controller for allocating a fixed size of buffer area on a shared memory to a pipe. Furthermore, memory of a fixed size is allocated to each port.
If memory of a fixed size is allocated to each pipe and data transfer is mainly in one direction as described above, a substantial amount of allocated memory is used inefficiently. Furthermore, if memory of a fixed size is allocated to each port and thus to each device connected, then a lot of memory will be wasted if a device requires small memory.